package com.jida.tijian.controller;

import com.jida.tijian.dto.CheckitemRequestDto;
import com.jida.tijian.dto.ResponseObject;
import com.jida.tijian.service.CheckitemDetailedService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class CheckitemDetailedController {

    @Autowired//连接业务层
    CheckitemDetailedService checkitemDetailedService;

    @RequestMapping("/checkitemDetailedList")
    public ResponseObject checkitemDetailedList(@RequestBody CheckitemRequestDto checkitemRequestDto){
        System.out.println("controller");
        System.out.println(checkitemRequestDto.getOrderId() +" "+ checkitemRequestDto.getSmId());
        //调用业务层service方法
        checkitemDetailedService.checkitemDetailedList(checkitemRequestDto);
        return new  ResponseObject(
                ResponseObject.SUCCESS_STATUS,
                ResponseObject.SUCCESS_DESC,
                checkitemDetailedService.checkitemDetailedList(checkitemRequestDto)
        );
    }

}
